﻿using System;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using isky.webapi;
using isky.dapper;
using isky.logic;
using Microsoft.Xrm.Sdk;
using isky.plugin;
using isky.Plugin;

namespace isky.unittests
{
    [TestClass]
    public class UnitTest1
    {
        string OrgUrl = System.Configuration.ConfigurationManager.AppSettings["OrgUrl"];
        string AdfsUrl = System.Configuration.ConfigurationManager.AppSettings["AdfsUrl"];
        string AuthUrl = System.Configuration.ConfigurationManager.AppSettings["AuthUrl"];
        RFMLogic rfmlogic = null;
        RFMRecencySql sql = null;
        [TestInitialize]
        public void Init()
        {
            rfmlogic = new RFMLogic();
            sql = new RFMRecencySql();
        }


        [TestMethod]
        public void TestMethod1()
        {
            //var result =sql.ListAccountOrderTotalAmount(3);
           // rfmlogic.RFMTiming();
        }

        [TestMethod]
        public void TestMethod3()
        {
            SalesOrderYGCBSql salesOrderYGCBSql = new SalesOrderYGCBSql();
          string result=  salesOrderYGCBSql.NumberToString((double)123456789).ToUpper();
            //DollarsNumberFormat f = new DollarsNumberFormat();
            //string  result= f.format(123456789.11);

        }


        [TestMethod]
        public void TestMethod2()
        {

            //XrmService xrmService = new XrmService();
            //IOrganizationService service = xrmService.GetOrgServiceByIFD();

            //SalesorderapprovalHistoryDal dall = new SalesorderapprovalHistoryDal();
            //dall.GetSalesorderapprovalProcessInfo(service);

            //XrmService xrmService = new XrmService();
            //IOrganizationService service = xrmService.GetOrgServiceByIFD();
            //SalesorderapprovalHistorySql salesorderapprovalHistorySql = new SalesorderapprovalHistorySql();
            ////var result =sql.ListAccountOrderTotalAmount(3);
            //salesorderapprovalHistorySql.GetRoleName();

            //XrmService xrmService = new XrmService();
            //IOrganizationService service = xrmService.GetOrgServiceByIFD();
            //SalesorderapprovalHistorySql salesorderapprovalHistorySql = new SalesorderapprovalHistorySql();
            ////var result =sql.ListAccountOrderTotalAmount(3);
            //salesorderapprovalHistorySql.GetRoleName();
        }

        
    }
}
